package me.firstapp.repository.bbs;

import java.util.Date;
import java.util.Map;

import me.firstapp.common.utils.Page;
import me.firstapp.module.bbs.Member;
import me.firstapp.repository.base.EntityRepository;

public interface MemberRepository extends EntityRepository<Member> {

	Member findMemberById(Long id, Long apiClientId);

	Member findMemberByName(String name, Long apiClientId);

	Member findMemberByEmail(String email, Long apiClientId);

	Member findMemberByMobile(String mobile, Long apiClientId);

	/**
	 * 分页查询用户
	 * 
	 * @param pageNo
	 *            页码
	 * @param pageSize
	 *            页容
	 * @param searchParams
	 *            搜索参数
	 * @param sortParam
	 *            排序字段
	 * @param sortType
	 *            排序类型 ASC,DESC
	 */
	Page<Member> findMemberPage(Integer pageNo, Integer pageSize, Map<String, Object> searchParams, String sortParam,
			String sortType, Date startTime, Date endTime, Long apiClientId);

	Long findMemberCountsByRegisterTime(Date startTime, Date endTime, Long apiClientId);
}
